home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / GLUT-3.7 / LIB / GLUT / Makefile.sgi < prev    next >
Encoding:
Makefile  |  1998-08-12  |  5.4 KB  |  189 lines

  1. #! smake
  2. #
  3. # Copyright (c) Mark J. Kilgard, 1995.
  4. #
  5. include $(ROOT)/usr/include/make/commondefs
  6.  
  7. # NOTE:  In my GLUT development tree, many of the C source files for
  8. # GLUT are generated.  For this reason, "make full_clobber" will remove
  9. # these generated C files, while "make clobber" will not.
  10.  
  11. TOP = ../..
  12.  
  13. TARGETS = libglut.a
  14.  
  15. LN = ln -s
  16. MV = mv
  17. RM = -rm -rf
  18.  
  19. HDRS = glutint.h glutstroke.h layerutil.h glutbitmap.h
  20.  
  21. SRCS = \
  22.     glut_bitmap.c \
  23.     glut_bwidth.c \
  24.     glut_cindex.c \
  25.     glut_cmap.c \
  26.     glut_cursor.c \
  27.     glut_dials.c \
  28.     glut_dstr.c \
  29.     glut_event.c \
  30.     glut_ext.c \
  31.     glut_fullscrn.c \
  32.     glut_gamemode.c \
  33.     glut_get.c \
  34.     glut_glxext.c \
  35.     glut_init.c \
  36.     glut_input.c \
  37.     glut_joy.c \
  38.     glut_key.c \
  39.     glut_keyctrl.c \
  40.     glut_keyup.c \
  41.     glut_menu.c \
  42.     glut_menu2.c \
  43.     glut_mesa.c \
  44.     glut_modifier.c \
  45.     glut_overlay.c \
  46.     glut_shapes.c \
  47.     glut_space.c \
  48.     glut_stroke.c \
  49.     glut_swap.c \
  50.     glut_swidth.c \
  51.     glut_tablet.c \
  52.     glut_teapot.c \
  53.     glut_util.c \
  54.     glut_vidresize.c \
  55.     glut_warp.c \
  56.     glut_win.c \
  57.     glut_winmisc.c \
  58.     layerutil.c
  59.  
  60. SRCSSEMIGENS = \
  61.     glut_8x13.c \
  62.     glut_9x15.c \
  63.     glut_hel10.c \
  64.     glut_hel12.c \
  65.     glut_hel18.c \
  66.     glut_mroman.c \
  67.     glut_roman.c \
  68.     glut_tr10.c \
  69.     glut_tr24.c
  70.  
  71. OBJS = $(SRCS:.c=.o) $(SRCSSEMIGENS:.c=.o)
  72. OTHERGENS = y.tab.c y.tab.h strokegen.c strokegen.h strokelex.c
  73. OTHERSRCS = strokegen.y strokelex.l stroke.h
  74. FONTS = Roman.stroke MonoRoman.stroke
  75.  
  76. # Uncomment the LCDEFS line below if you want to build a version of
  77. # libglut.a that avoids using the SGI "fast atoms" optimization
  78. # introduced in IRIX 6.3.  This optimization eliminates serveral X server
  79. # round-trips.  If you are building libglut.a on an IRIX 6.3 or later
  80. # machine and want a chance (no guarantees) that GLUT executables built
  81. # against your libglut.a will work on IRIX 6.2 machines, uncomment out
  82. # the LCDEFS line below.  Otherwise, you'll get a run-time message about
  83. # "attempted access to unresolvable symbol in XXX: _XSGIFastInternAtom"
  84. #LCDEFS = -DNO_FAST_ATOMS
  85.  
  86. LCOPTS = -I$(TOP)/include -fullwarn 
  87. LWOFF = ,813,852,827,826
  88. LDIRT = *~ $(OTHERGENS) strokegen *.bak hardcopy glutsrc.ps capturexfont *.pure dstr dstr.c *.gen
  89.  
  90. default: $(TARGETS)
  91.  
  92. sinclude ObjectType.mk
  93.  
  94. $(OBJS) : $(HDRS)
  95.  
  96. libglut.a : $(OBJS)
  97.     $(RM) $@
  98.     $(AR) crl $@ $(OBJS)
  99.  
  100. .ORDER : strokegen.h strokegen.c
  101.  
  102. strokegen.h strokegen.c : strokegen.y
  103.     $(YACC) -d strokegen.y
  104.     $(MV) y.tab.c strokegen.c
  105.     $(MV) y.tab.h strokegen.h
  106.  
  107. # avoid warnings when compiling lex generated code
  108. strokegen.o : strokegen.c
  109.     $(CC) $(CFLAGS) -woff 726,825,635,818,819,820,824,831,835,822,821,1167,1498,1116,1136,1174,1196,803 -c -MDupdate Makedepend strokegen.c
  110.  
  111. strokelex.c : strokelex.l
  112.     $(LEX) strokelex.l
  113.     $(MV) lex.yy.c strokelex.c
  114.  
  115. # avoid warnings when compiling lex generated code
  116. strokelex.o : strokelex.c
  117.     $(CC) $(CFLAGS) -woff 831,825,817,835,702,819,635,824,822,1167,1498,1110,1196,1174,803 -c -MDupdate Makedepend strokelex.c
  118.  
  119. strokegen : strokegen.o strokelex.o
  120.     $(CC) -o $@ $(LDFLAGS) strokegen.o strokelex.o -ll
  121.  
  122. capturexfont : capturexfont.o
  123.     $(CC) -o $@ $(LDFLAGS) capturexfont.o -lX11
  124.  
  125. # glut_roman.c and glut_mroman.c are now checked in, but here are rules to generate them
  126. glut_roman.c.gen : Roman.stroke strokegen
  127.     ./strokegen -s glutStrokeRoman < Roman.stroke > $@
  128. glut_mroman.c.gen : MonoRoman.stroke strokegen
  129.     ./strokegen -s glutStrokeMonoRoman < MonoRoman.stroke > $@
  130.  
  131. glutsrc.ps : $(SRCS)
  132.     $(RM) hardcopy
  133.     mkdir -p hardcopy
  134.     for i in $(SRCS) ;\
  135.     do \
  136.       grep -v CENTRY $$i | grep -v INDENT- > hardcopy/$$i; \
  137.     done
  138.     cd hardcopy ; enscript -p ../$@ -G -2r `echo $(SRCS) | fmt -1 | sort`
  139.     $(RM) hardcopy
  140.  
  141. # The bitmap files can be generated using capturexfont, but because
  142. # they require a connection to an X server and potentially different
  143. # X servers have different fonts, these generated files are part
  144. # of the GLUT distribution.
  145.  
  146. 9_BY_15 = -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1
  147. 8_BY_13 = -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1
  148. TR10 = -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1
  149. TR24 = -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1
  150. HEL10 = -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1
  151. HEL12 = -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1
  152. HEL18 = -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1
  153.  
  154. semigens : capturexfont
  155.     ./capturexfont $(9_BY_15) glutBitmap9By15 > glut_9x15.c.gen
  156.     ./capturexfont $(8_BY_13) glutBitmap8By13 > glut_8x13.c.gen
  157.     ./capturexfont $(TR10) glutBitmapTimesRoman10 > glut_tr10.c.gen
  158.     ./capturexfont $(TR24) glutBitmapTimesRoman24 > glut_tr24.c.gen
  159.     ./capturexfont $(HEL10) glutBitmapHelvetica10 > glut_hel10.c.gen
  160.     ./capturexfont $(HEL12) glutBitmapHelvetica12 > glut_hel12.c.gen
  161.     ./capturexfont $(HEL18) glutBitmapHelvetica18 > glut_hel18.c.gen
  162.  
  163. # unused test rule for test building 16-bit font
  164. JIS = -jis-fixed-medium-r-normal--24-230-75-75-c-240-jisx0208.1983-0
  165. glut_jis.c : 
  166.     ./capturexfont $(JIS) glutBitmapJis > $@
  167.  
  168. sources: $(SRCS)
  169.  
  170. symcheck: libglut.a
  171.     -nm -Bo libglut.a | grep -v ' d ' | grep -v ' T glut' | grep -v ' D glut' | grep -v ' U ' | grep -v ' T __glut' | grep -v ' t ' | grep -v ' b ' | grep -v ' D __glut' | grep -v ' B __glut'
  172.  
  173. dstr.c: glut_dstr.c
  174.     ln -s glut_dstr.c $@
  175.  
  176. dstr: dstr.c glut_util.o glut_glxext.o
  177.     $(RM) $@
  178.     $(CC) -g -o $@ $(CFLAGS) -DTEST dstr.c glut_util.o glut_glxext.o -lGLU -lGL -lXext -lX11 -lm
  179.  
  180. ./glut.h : glut.h
  181. ./glutint.h : glutint.h
  182. ./glutstroke.h : glutstroke.h
  183. ./strokegen.h : strokegen.h
  184. ./stroke.h : stroke.h
  185. ./layerutil.h : layerutil.h
  186. strokelex.o: strokelex.c strokegen.h
  187.  
  188. include $(COMMONRULES)
  189.